<extend name="Public/publicHTML"/>
<block name="nav">
    <script src="__COMMON__/js/Ueditor/ueditor.config.js"></script>
    <script src="__COMMON__/js/Ueditor/ueditor.all.min.js"> </script>
    <script src="__COMMON__/js/Ueditor/lang/zh-cn/zh-cn.js"></script>
    <div class="nav">
        <div class="nav_title">
            <h4><img class="nav_img" src="__IMG__/tab.gif" /><span class="nav_a">文章添加</span></h4>
        </div>
    </div>
    <br/><br/>
</block>
<block name="content">
    <link rel="stylesheet"  href="__COMMON__/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet"  href="__COMMON__/bootstrap/css/font-awesome.min.css"/>
    <section class="content">
        <div class="container-fluid">
            <div class="pull-right">
                <a href="" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> 文章详情</h3>
                </div>
                <div class="panel-body">

                    <form method="post" action="{:U()}" >

                        <div class="tab-content">
                            <div class="tab-pane active" id="tab_tongyong">

                                <table class="table table-bordered">
                                    <tbody>
                                    <tr>
                                        <td>文章标题:</td>
                                        <td>
                                            <input type="text" value="{$row.name}" name="name" class="form-control" style="width:400px;"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>文章分类</td>
                                        <td>
                                            <select name="article_category_id" class="form-control" style="width:200px;">
                                                <foreach name="rows" item="row1">
                                                    <option value="{$row1['id']}" <if condition="($row1.id eq $row['article_category_id'])">selected="selected"</if>>
                                                    {$row1.name}
                                                    </option>
                                                </foreach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>文章描述</td>
                                        <td>
                                            <textarea rows="3" cols="100" name="intro">{$row.intro}</textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>文章内容</td>
                                        <td>
                                            <textarea  name="content" cols="80" rows="6" id="editor" >{$data.content}</textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>排序</td>
                                        <td>
                                            <input type="text"  name="sort" class="form-control" value="{$row.sort|default=10}" style="width:550px;"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>是否显示</td>
                                        <td>
                                            <label class="radio-inline">
                                                <input type="radio" name="status" class="status" id="inlineRadio3" value="1"> 是
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="status" class="status" id="inlineRadio4" value="0"> 否
                                            </label>
                                            <input type="hidden" name="id" value="{$row.id}"/>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="pull-right">
                            <input type="submit" class="btn btn-primary" data-toggle="tooltip"   data-original-title="保存" value='保存'>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
    <script type="text/javascript" src="__COMMON__/js/alert.js?a={:time()}"></script>
    <js href='__COMMON__/js/jquery-1.11.3.min.js'/>
    <script type="text/javascript" src="__JS__/article/ueditor.config.js?a={:time()}"></script>
    <script type='text/javascript'>
        var ue = UE.getEditor('editor');
        $(function(){
            //回显文章分类显示
            $('.status').val([{$status|default=1}]);

        });
    </script>

</block>

